package com.hns.phone.master.service;

import java.util.List;
import java.util.Map;

import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;

import com.hns.frame.service.CommonService;
import com.hns.tool.pub.PubUtil;

@Service
public class PhoneHomeTransitService extends CommonService {
	/**
	 * 加载公交首页数据
	 * @param map	参数
	 * @param funcType 功能类型
	 * @param className	转化类型名称
	 * @return
	 * @throws Exception
	 * @author:zhangyu
	 * @email:zhangyu2222z@sina.cn
	 */
	@SuppressWarnings("unchecked")
	public List<T> getHomeData(Map<String, Object> map, String funcType, String className) throws Exception{
		List<T> list = null;
		Class<?> clazz = Class.forName("com.hns.can.master.vo."+className);
		try{
			list = PubUtil.convertListMapToObject(this.sqlMapDao.selectList("phoneHomeTransit."+funcType, map), clazz);
		}catch(Exception e){
			e.printStackTrace();
		}
		return list;
	}
}
